<?php


namespace app\webs\controller;


use app\common\controller\Api;
use app\webs\model\GiftModel;
use think\Model;

class Gift extends Api
{

    public function index()
    {
        $card = GiftModel::order('id','DESC')
            ->where('switch',1)
            ->field('id,title,english,remark,image,create_time')
            ->limit(3)
            ->select();
        if (!$card){
            $this->error('查询失败');
        }
        $this->success('查询成功',$card);
    }
}